package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CwBlindBoxContentsMapper;
import com.ruoyi.system.domain.CwBlindBoxContents;
import com.ruoyi.system.service.ICwBlindBoxContentsService;

/**
 * 盲盒稀有度Service业务层处理
 * 
 * @author hyx
 * @date 2024-11-22
 */
@Service
public class CwBlindBoxContentsServiceImpl implements ICwBlindBoxContentsService 
{
    @Autowired
    private CwBlindBoxContentsMapper cwBlindBoxContentsMapper;

    /**
     * 查询盲盒稀有度
     * 
     * @param contentId 盲盒稀有度主键
     * @return 盲盒稀有度
     */
    @Override
    public CwBlindBoxContents selectCwBlindBoxContentsByContentId(Long contentId)
    {
        return cwBlindBoxContentsMapper.selectCwBlindBoxContentsByContentId(contentId);
    }

    /**
     * 查询盲盒稀有度列表
     * 
     * @param cwBlindBoxContents 盲盒稀有度
     * @return 盲盒稀有度
     */
    @Override
    public List<CwBlindBoxContents> selectCwBlindBoxContentsList(CwBlindBoxContents cwBlindBoxContents)
    {
        return cwBlindBoxContentsMapper.selectCwBlindBoxContentsList(cwBlindBoxContents);
    }

    /**
     * 新增盲盒稀有度
     * 
     * @param cwBlindBoxContents 盲盒稀有度
     * @return 结果
     */
    @Override
    public int insertCwBlindBoxContents(CwBlindBoxContents cwBlindBoxContents)
    {
        return cwBlindBoxContentsMapper.insertCwBlindBoxContents(cwBlindBoxContents);
    }

    /**
     * 修改盲盒稀有度
     * 
     * @param cwBlindBoxContents 盲盒稀有度
     * @return 结果
     */
    @Override
    public int updateCwBlindBoxContents(CwBlindBoxContents cwBlindBoxContents)
    {
        return cwBlindBoxContentsMapper.updateCwBlindBoxContents(cwBlindBoxContents);
    }

    /**
     * 批量删除盲盒稀有度
     * 
     * @param contentIds 需要删除的盲盒稀有度主键
     * @return 结果
     */
    @Override
    public int deleteCwBlindBoxContentsByContentIds(Long[] contentIds)
    {
        return cwBlindBoxContentsMapper.deleteCwBlindBoxContentsByContentIds(contentIds);
    }

    /**
     * 删除盲盒稀有度信息
     * 
     * @param contentId 盲盒稀有度主键
     * @return 结果
     */
    @Override
    public int deleteCwBlindBoxContentsByContentId(Long contentId)
    {
        return cwBlindBoxContentsMapper.deleteCwBlindBoxContentsByContentId(contentId);
    }
}
